Move setting of configuration variables to Config.mk.
Allows for partial-tree builds to be invoked from a sub-directory.
Allow for users to include a ".config" with additional custom settings.
Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
emellor@ewan [Wed, 5 Oct 2005 10:43:23 +0000 (11:43 +0100)]
Removed the EventServer, replacing the events fired with simple logging
messages. This closes bug #281. Removed references to XendRoot where these
have become unnecessary either through the work above or just through time.
Renamed some parameters in event.py, to mark them as unused. Fix a call to a
base class constructor there too.
emellor@ewan [Tue, 4 Oct 2005 16:49:52 +0000 (17:49 +0100)]
Merge the child-process handling of the save and restore functions into one
forkHelper function. Change the handling of file descriptor closure to wait
until both stdout and stderr descriptors have closed. This may fix the
intermittent bug seen whereby xm restore; xend restart leaves the domain in a
misconfigured state, presumably because IntroduceDomain is not being called by
XendCheckpoint.restore.
emellor@ewan [Tue, 4 Oct 2005 15:38:04 +0000 (16:38 +0100)]
Removed unused xen_domain method, and unused imports. Comment those methods
expecting domains_lock protection. Remove notifications through eserver for
_add_domain and _delete_domain, and remove the notify parameters therein.
emellor@ewan [Tue, 4 Oct 2005 15:27:16 +0000 (16:27 +0100)]
Fix call to state_set inside preserve (was erroneously calling set_state).
Tidy exception handling, and rename local 'channel' variable which was clashing
with the identical global name.
Clean up sched_op() hypercall interface. One particular
change to watch out for is that the suspend record, on
save/restore, is now passed via register %edx not %esi
(both i386 and x86/64).
Fix tools to pull public header files from standard
location in libxc directory. Not direct from xen and
xenlinux build trees! Also fix a type name in
x86_emulator test harness.
emellor@ewan [Tue, 4 Oct 2005 10:14:50 +0000 (11:14 +0100)]
Fix localhost live migration. We were overvigorously wiping out the store
entries when a domain closed and on save, which meant that the /vm entries
disappeared when a localhost migration occurred. XendCheckpoint has had extra
exception handling and logging added. It also now calls back through
XendDomain.restore_,which has the correct locking semantics to prevent race
conditions during migration.
Added assertions to XendCheckpoint to ensure that the channels are set after
XendDomainInfo.restore. I don't see why they would not be, and the old code
meant that in the case that they were not, IntroduceDomain would not be called
on the new domain, breaking Xend restart.
relocate calls through XendDomain.domain_restore_fd rather than directly to
XendCheckpoint to isolate XendCheckpoint from the rest of the world, and to
allow XendDomain to pass itself into XendCheckpoint for a callback.
Simplify the XendCheckpoint / XendDomainInfo interlock, giving only two
states, OK and TERMINATED. If XendCheckpoint asks for a suspend, but sees a
shutdown, it is valid for it to proceed -- either way the domain has stopped.
Higher level tools may wish to disallow this, but at the very least, there is
no sense in waiting for a suspend that will never come.
emellor@ewan [Tue, 4 Oct 2005 10:01:38 +0000 (11:01 +0100)]
Use the domain ID to refer to backends, not the UUID. This means that a new
backend is used on a localhost live migrate; migration was failing otherwise.
emellor@ewan [Tue, 4 Oct 2005 01:25:04 +0000 (02:25 +0100)]
Move the import for XendError, and use a bare import, not a from...import.
This should silence the error message when the program is terminated during
startup.
emellor@ewan [Tue, 4 Oct 2005 01:21:28 +0000 (02:21 +0100)]
Move XendDomainInfo.{create,recreate,parseConfig} to the top level of the
domain. This allows us to refer to them using an import statement, rather than
a from .. import. This is a step towards getting rid of the xroot hack. All
other references to XendDomainInfo methods need to be doubly qualified (once
for the module, once for the class).
Remove XendDomainDict, replacing it with a simple dictionary, folding the
get_by_name method into XendDomain.
Replace XendDomain.refresh_lock with a domains_lock which goes around any
reference to XendDomain.domains or anything that will create or destroy a
domain. This serialises most accesses through XendDomain, ensuring that we will
not return stale state when racing against the watches fired in separate
threads. This should have fixed bugs #270 and #234.
Added a number of domain_get_xyz methods. Those named xyz_nr are to allow
components internal to XendDomain (XendDomainInfo, XendCheckpoint) to call back
into XendDomain without triggering further calls to XendDomain.refresh. The
other methods simply make it clear which fallback behaviour is expected.
Replace XendDomainInfo.domain_exists with XendDomainInfo.domain_by_name; the
internals of this method needed to change to match those changes above, and it
has been a misnomer for some time.
emellor@ewan [Mon, 3 Oct 2005 23:57:34 +0000 (00:57 +0100)]
Remove the reason code from the destroy action -- the reason is only of value
on a graceful shutdown. Clarify the semantic difference between poweroff and
halt (we use halt to mean 'shutdown and stop' and poweroff to mean 'shutdown
and do whatever the configured behaviour is').
emellor@ewan [Mon, 3 Oct 2005 23:56:24 +0000 (00:56 +0100)]
Remove the reason code from the destroy action -- the reason is only of value
on a graceful shutdown. Clarify the semantic difference between poweroff and
halt (we use halt to mean 'shutdown and stop' and poweroff to mean 'shutdown
and do whatever the configured behaviour is').
emellor@ewan [Mon, 3 Oct 2005 23:30:49 +0000 (00:30 +0100)]
Remove the reason parameter from XendDomain.destroy -- it is useless. Accept
the halt shutdown reason inside XendDomainInfo. This indicates that the
domain should be shutdown just like a poweroff, except that the domain is not
restarted, regardless of the on_poweroff configuration setting.
emellor@ewan [Mon, 3 Oct 2005 15:39:19 +0000 (16:39 +0100)]
Remove the reason code from the destroy action -- the reason is only of value
on a graceful shutdown. Clarify the semantic difference between poweroff and
halt (we use halt to mean 'shutdown and stop' and poweroff to mean 'shutdown
and do whatever the configured behaviour is').
emellor@ewan [Mon, 3 Oct 2005 15:33:09 +0000 (16:33 +0100)]
Move the import for XendError, and use a bare import, not a from...import.
This should silence the error message when the program is terminated during
startup.
emellor@ewan [Sun, 2 Oct 2005 22:56:13 +0000 (23:56 +0100)]
The stopgap in changeset 7152:a73ab0ddf990 was broken -- revert the change to
domain_lookup_by_name, as it causes an infinite loop on startup. Leave the
domain_lookup change.
emellor@ewan [Sun, 2 Oct 2005 17:21:01 +0000 (18:21 +0100)]
Call refresh in the domain_lookup and domain_lookup_by_name methods. This
should reduce the incidence of stale domain information being used by xend, but
is only a stop-gap.
Also send xenbus notifications using evtchn as handle. It's
always up-to-date as it's reinitialised for us by external
tools during save/restore and migration.
xencons must notify via evtchn. It can't use the irq as the
notification handle because console is used early, before the
irq is set up. Signed-off-by: Keir Fraser <keir@xensource.com>
Add the config file parsing for the on_{poweroff,reboot,crash} options, so that
they actually take effect. Added behaviour "rename-restart" for debugging
purposes, that renames the domain out of the way, preserving it for debugging,
but starts a new domain too.
Add explicit remove of old domain paths when creating a new domain, to avoid
stale information affecting us (by shutting the domain down, for example).
Update comment/variable names to reflect the fact that the backend paths now
contain the frontend domid, not the uuid. The actual functionality is the same,
because the ID is referred to by path level, so the change in semantics is not
a problem.
Within the store, split the persistent information regarding a VM from the
transient information regarding a domain. This allows live localhost migration,
which is important for testing migration, and also allows migration when we
have a distributed store. The backend paths in the store now refer to the
frontend domain ID, not its UUID, and blktap has changed to match.
To support this split in the information, the cleanup procedure has been split
to match.
Change the save-restore interface between XendDomain, XendDomainInfo, and
XendCheckpoint, to remove some intermingling, in particular taking XendDomain
out of the loop for the restore procedure.
Improved the recovery procedure to avoid trying to destroy dom0 when recovering.
Added a lock around XendDomain.refresh and one around
XendDomainInfo.refreshShutdown, to improve the behaviour when recreating
domains at startup. There are still races here, so more thought needs to be
given to the locking.
Live reconfiguration of an existing domain is temporarily broken.
Remove the bizarre arrangement whereby EventChannel inherits from dict. Move
the channel-creation logic into eventChannel, making the EventChannel class
simpler. Remove the closeEventChannel method -- it was simply doing a check
for None, and that isn't enough value to justify the extra method when there
is an EventChannel.close method there too.
Added DevController.configuration and configurations methods. These parse the
store for the current device configuration, and convert it back into the
s-expression used in the config files and the save files. This means that we
can bring the devices up properly on restore.
Fix compiler warnings when shadow debugging is enabled.
Fix two classes of warnings when debugging of shadow code is enabled:
- The type_info field in pfn_info is a long, so use a %lx format
specifier when printing it.
- Fix a warning about uninitialized use of eff_guest_pte.
Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
full devices expect to be able to read the partition table during xlvbd_add
but couldn't because the device was not marked as BLKIF_CONNECTED and thus
blkif_queue_request discarded the read request. fix bug #220
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
Define new notify_remote_via_irq() interface which is a
safe version for drivers to use that is aware of
save/restore. Post-restore notifications are silently
dropped, in the expectation that xenbus will eventually
get round to telling the driver it needs to reconnect.
Change semantics of bind_evtchn_to_xxx and
unbind_evtchn_from_xxx. The bind now returns the IRQ
number on success. The unbind takes this as a parameter
instead of the event-channel port. Also, unbind closes
down the underlying event-channel port if it is still
live.
This patch fixes a race between when the disable cpu is marked online
and binding IPIs back to the CPU. In some cases, an IPI would be sent
to CPU1 before it had allocated a new evtchn. Moving smp_resume() call
before setting the cpu online fixes this race. This fixes bug #228
(http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=228).
Fixes for blkif save/restore. A 'dd if=/dev/sda1 of=/dev/null'
seems to lock up the domU kernel on restore still (can be
pinged but not ssh'ed). This still needs investigation.
Change device IDs to be integers, as required now by DevController. Remove
unused op_device. Remove broken code to show the domain configuration using
the HTTP server.